<Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
  <!--
    This is useful for local testing to print the produced helix items
    To use this when you are changing how items are produced, uncomment the target
    and replace the Project item at the top of the file with this:
    <Project DefaultTargets="printItems">

    Once you've done that you can run this to see the results:
    dotnet msbuild .\superpmi-asmdiffs.proj /v:n
   -->

   <!-- <PropertyGroup>
     <HelixTargetQueues>Some_Queue</HelixTargetQueues>
     <Platform>Windows</Platform>
     <Architecture>x64</Architecture>
   </PropertyGroup>

  <Target Name="printItems">
        <Message Text="@(HelixWorkItem -> 'name: %(HelixWorkItem.Identity)
     dir: %(HelixWorkItem.PayloadDirectory)
     pre: %(HelixWorkItem.PreCommands)
     command: %(HelixWorkItem.Command)
     post: %(HelixWorkItem.PostCommands)
     timeout: %(HelixWorkItem.Timeout)  '"/>
  </Target> -->

  <PropertyGroup>
    <Python>%HELIX_PYTHONPATH%</Python>
    <ProductDirectory>%HELIX_CORRELATION_PAYLOAD%</ProductDirectory>
    <SuperpmiLogsLocation>%HELIX_WORKITEM_UPLOAD_ROOT%</SuperpmiLogsLocation>
    <WorkItemCommand>$(Python) $(ProductDirectory)\superpmi_asmdiffs_checked_release.py --diff_with_release -base_jit_directory $(ProductDirectory)\base -diff_jit_directory $(ProductDirectory)\diff -log_directory $(SuperpmiLogsLocation)</WorkItemCommand>
    <WorkItemTimeout>3:00</WorkItemTimeout>
  </PropertyGroup>

  <PropertyGroup>
    <EnableAzurePipelinesReporter>false</EnableAzurePipelinesReporter>
    <EnableXUnitReporter>false</EnableXUnitReporter>
    <Creator>$(_Creator)</Creator>
    <HelixAccessToken>$(_HelixAccessToken)</HelixAccessToken>
    <HelixBuild>$(_HelixBuild)</HelixBuild>
    <HelixSource>$(_HelixSource)</HelixSource>
    <HelixTargetQueues>$(_HelixTargetQueues)</HelixTargetQueues>
    <HelixType>$(_HelixType)</HelixType>
  </PropertyGroup>

  <ItemGroup>
    <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
      <PayloadDirectory>%(Identity)</PayloadDirectory>
    </HelixCorrelationPayload>
  </ItemGroup>

  <ItemGroup Condition="'$(Architecture)' == 'x64'">
    <SPMI_Partition Include="windows-x64" Platform="windows" Architecture="x64" />
    <SPMI_Partition Include="windows-arm64" Platform="windows" Architecture="arm64" />
    <SPMI_Partition Include="linux-x64" Platform="linux" Architecture="x64" />
    <SPMI_Partition Include="linux-arm64" Platform="linux" Architecture="arm64" />
  </ItemGroup>

  <ItemGroup Condition="'$(Architecture)' == 'x86'">
    <SPMI_Partition Include="windows-x86" Platform="windows" Architecture="x86" />
    <SPMI_Partition Include="linux-arm" Platform="linux" Architecture="arm" />
  </ItemGroup>

  <ItemGroup>
    <HelixWorkItem Include="@(SPMI_Partition)">
      <Command>$(WorkItemCommand) -arch %(HelixWorkItem.Architecture) -platform %(HelixWorkItem.Platform)</Command>
      <Timeout>$(WorkItemTimeout)</Timeout>
      <DownloadFilesFromResults>superpmi_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).log;superpmi_download_%(HelixWorkItem.Platform)_%(HelixWorkItem.Architecture).log</DownloadFilesFromResults>
    </HelixWorkItem>
  </ItemGroup>
  </Project>
